import React, { Component } from 'react'
import Img from './Img'
import '../assets/style/list.less'
export default class list extends Component {
    render() {
        return (
            <a href={this.props.href + '/' + this.props.data.id} className="list_a" >
                < div className={"listOne " + this.props.className}>
                    <Img src={'/syc_api' + JSON.parse(this.props.data.image)[0] } className="listOne_img"></Img>
                    <div className="listOne_right">
                        <div className="listOne_right_top">
                            <div className="listOne_right_left">
                                <div className="right_left_top">
                                    <div>{this.props.data.title}</div>
                                    <span>{this.props.data.status===0?'新盘':"在售"}</span>
                                </div>
                                <div className="address fonts">{this.props.data.address.split(' ').join('-')}</div>
                                <div className="type fonts">{this.props.data.type}</div>
                            </div>
                            <div className="listOne_right_right">
                                {this.props.data.price}元/㎡
                            </div>
                        </div>
                        <ul className="listOne_right_bottom">
                            {
                                this.props.data.tag.split(' ').map((item, index) => {
                                    return <span key={index}>{item}</span>
                                })
                            }
                        </ul>
                    </div>
                </div>
            </a>
        )
    }
}
